<form class="form-horizontal" ng-submit="execute()">

    <div class="form-group">
        <label for="spi-bus" class="col-sm-2 control-label">Bus number</label>
        <div class="col-sm-1">
            <input type="number" id="spi-bus" min="0" max="1" class="form-control" ng-model="bus" ng-change="busChange()" required />
        </div>
    </div>

    <div class="form-group"">
        <label for="spi-write" class="col-sm-2 control-label">Write</label>
        <div class="col-sm-5">
            <textarea rows="3" id="spi-write" class="form-control" ng-model="write" required></textarea>
        </div>
    </div>

    <div class="form-group"">
        <label for="spi-read" class="col-sm-2 control-label">Read</label>
        <div class="col-sm-5">
            <textarea rows="3" id="spi-read" class="form-control" ng-model="read" readonly></textarea>
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-primary" ng-click="buttonClick()">Write and read</button>
        </div>
    </div>

    <div class="alert alert-{{status}}" ng-show="finished">{{statusText}}</div>

</form>

<form class="form-horizontal">
    <div class="form-group">
        <label for="spi-frequency" class="col-sm-2 control-label">Frequency</label>
        <div class="col-sm-2">
            <input type="number" id="spi-frequency" min="1" max="100000000" class="form-control" ng-model="frequency" ng-change="frequencyChange()" />
        </div>
    </div>

    <div class="alert alert-warning" ng-hide="frequencyStatus">Could not change frequency!</div>
</form>
